package com.rykj.energy.entrance;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.rykj.energy.common.config.QuartzConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
@SpringBootApplication(exclude={DruidDataSourceAutoConfigure.class})
@ComponentScan(basePackages = {"com.rykj"})
public class EnergyApplication {
    public static void main(String[] args) {
        new SpringApplicationBuilder(EnergyApplication.class)
                .web(WebApplicationType.SERVLET)
                .run(args);
    }

    @Bean
    public QuartzConfiguration getQuartzConfiguration(){
        return  new QuartzConfiguration();
    }
}
